#include "../Include/IGSensor.h"
#include "SamsungGSensor.h"
#include "HTCGSensor.h"

IGSensor::IGSensor(void)
{
}

IGSensor::~IGSensor(void)
{
}

void IGSensor::GVectorChanged(GVector gVector)
{
	notify(&IGSensorListener::IGSensor_GVectorChanged, gVector);
}

IGSensor* GSensorFactory::CreateGSensor()
{
	try
    {
		return SamsungGSensor::GetInstance();
    }
	catch(std::runtime_error& err)
	{
		printf("%s\n", err.what());
	}

	try
    {
		return HTCGSensor::Create();
    }
	catch(std::runtime_error& err)
	{
		printf("%s\n", err.what());
	}
	
    return NULL;
}
